
#ifndef _CENTRALTABWIDGET_H_
#define _CENTRALTABWIDGET_H_

#include "WidgetsApi.hpp"
#include "../OLCore/AbstractWidget.hpp"
#include "../OLCore/AbstractTabWidget.hpp"
#include "../OLApp/defines.hpp"
#include <PythonQt.h>
#include <QMap>
#include <QTabWidget>

namespace NSWidgets {


	class WIDGETSAPI CentralTabWidget: 
		public NSCore::AbstractTabWidget
	{
		Q_OBJECT
	private:
		/*Renderer widgets*/
		QMap<QString, QPair<int, NSCore::AbstractObject*>> m_widgets;

	public:
		int addWidget(QString name = QString());
		int removeWidget(int index);
		int removeWidget(QString name);
		/*Set*/
		int addExWidget(NSCore::AbstractObject* widget, QString name = QString(), QIcon icon = QIcon());
		int addDataBaseWidget(QString name);

		/*Get*/
		NSCore::AbstractObject* getTabWiget(int id = 0);

	public:
		CentralTabWidget(QWidget* w = nullptr);
		~CentralTabWidget();

	signals:
		void actionCentralTabWidgetClose(int /*index*/);

	public slots:
		void actionCentralTabWidgetCloseSlot(int index);

	public: /*override*/
		virtual inline QString className() override { return "CentralTabWidget"; };


	};

}


#endif
